package com.arron.algorithm.leetcodetop100.技巧.位操作;

import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;

public class two的幂 {


    public boolean isPowerOfTwo(int n) {

        if (n<=0){
            return false;
        }
        return (n & (n-1)) == 0;
    }

}
